package com.sinosoft.hydra.um.services.component.message;

import com.sinosoft.hydra.um.domain.permission.TMessage;
import com.sinosoft.hydra.um.domain.permission.TMessageReceiver;

/**
 * Created by Administrator on 2015/8/26.
 */
public interface MessageSendProxy {

    /**
     * 是否是匹配的类型
     *
     * @param type
     * @return
     */
    boolean isValid(String type);

    /**
     * 发送消息，返回成功或失败
     *
     * @param tMessage
     * @param messageReceiver
     * @return
     */
    boolean send(TMessage tMessage, TMessageReceiver messageReceiver);
}
